function chushi(){
var bigTable = document.querySelector(".bigTable");//主桌大div
var circle = bigTable.querySelectorAll(".circle");
var cir_box = document.querySelector(".cir_box");//次卓大div
var ci_circle = cir_box.querySelectorAll(".circle");
var tables = document.querySelectorAll(".hastable");//次卓大div儿子
var addtable = document.querySelector(".addtable");//添桌
var f_text = document.querySelector(".f_text");//
var f_text2 = document.querySelector(".f_text2");
console.log(cir_box.children);
//次桌选座位
for(let i=0;i<cir_box.children.length;i++){
	console.log(cir_box.children[0]);
    for(let j=1;j<cir_box.children[i].children.length;j++){
    cir_box.children[i].children[j].children[0].style.display  = "none";
//  	var isClick  = true;
    	cir_box.children[i].children[j].addEventListener("click",function(){
    	if(cir_box.children[i].children[j].children[0].style.display == "none"){   	
//  		isClick = false;
    		cir_box.children[i].children[j].children[0].style.display  = "inline-block";
    	 }else if(cir_box.children[i].children[j].children[0].style.display == "inline-block"){
    	 	console.log(1);
//  	 	isClick =true;
    	 	cir_box.children[i].children[j].children[0].style.display  = "none";
    	 }
    	})
 }
}

//主桌选座位
for(let i=0;i<circle.length;i++){
//  circle[i].children[0].style.display = "none";
// var isClick = true;
		circle[i].addEventListener("click",function(){
			if(circle[i].children[0].style.display == "none"){
//				         isClick = false;
						 circle[i].children[0].style.display = "inline-block";
						  console.log(circle[i].children[0].dataset.num);
						  var num =	circle[i].children[0].dataset.num;
						  console.log(bigTable.dataset.bnum);
						  var bnum=bigTable.dataset.bnum
						  var  _text = "你已成功入席，<br>你的座位是主<span>"+bnum+"</span> 桌第<span>"+num+"</span>位";
						  f_text2.innerHTML = _text;
						  f_text.innerHTML = _text;
			}
			else if(circle[i].children[0].style.display == "inline-block"){
//					  isClick = true;
						 circle[i].children[0].style.display = "none";
						  console.log(circle[i].children[0].dataset.num);
						  var num =	circle[i].children[0].dataset.num;
						  console.log(bigTable.dataset.bnum);
						  var bnum=bigTable.dataset.bnum
						  var  _text = "你已成功入席，<br>你的座位是主__桌第__位";
						  f_text2.innerHTML = _text;
						  f_text.innerHTML = _text;
			}
		})
}


bigTable.addEventListener("click",function(){
        bigTable.style.transform = "scale(2)";
        bigTable.style.top = "45vw";
        addtable.style.display = "none";
        f_text.style.display = "none";
        f_text2.style.display = "block";
        for(let i = 0;i<tables.length;i++){
            tables[i].style.display = "none";
//          console.log(tables[i]);
        }
})


for(let i = 0;i<tables.length;i++){
       tables[i].addEventListener("click",function(){
            for(let j = 0;j<tables.length;j++){
                tables[j].style.display = "none";
            }
            bigTable.style.display = "none";
            tables[i].style.display = "block";
            // tables[i].style.margin = "0vw auto"
            tables[i].style.left = "40%"
            tables[i].style.top = "60vw";
            tables[i].style.transform = "scale(2.7)";
            addtable.style.display = "none";
            f_text.style.display = "none";
            f_text2.style.display = "block";
       })     
}
var back = document.querySelector(".back");
back.addEventListener("click",function(){
    for(let i = 0;i<tables.length;i++){
            tables[i].style.display = "block";
            tables[i].style.transform = "scale(1)";
            tables[i].style.margin = "none"
            tables[i].style.left = "0%";
            tables[i].style.transform = "translateX(0)"
            tables[i].style.top = "0vw";
    }
    bigTable.style.display = "block";
    bigTable.style.top = "0vw";
    bigTable.style.transform = "scale(1)";
    f_text.style.display = "block";
    f_text2.style.display = "none";
    addtable.style.display = "block";
  
})
}
//无用的文件